Skip to content

Add Delivered-To (RFC 9228) to the trace headers in InternetHeaders - #878

Draft
jpfigueredo wants to merge 1 commit into
jakartaee:mainfrom
jpfigueredo:delivered-to-rfc9228
Draft

jpfigueredo wants to merge 1 commit into
jakartaee:mainfrom
jpfigueredo:delivered-to-rfc9228

Conversation

@jpfigueredo

Copy link
Copy Markdown

Fixes #873

RFC 9228 §4 requires each new Delivered-To header to be placed at the current top of the header fields, like the SMTP trace fields. It also must not be reordered with respect to other Delivered-To fields and those other fields. InternetHeaders.addHeader already inserts Received this way. This change treats Received and Delivered-To as one sequence: each new one goes above any existing header of either name, below a possible Return-Path.

Tests: InternetHeadersTest covers adding to empty headers, the example from RFC 9228 §5, Return-Path staying first, and headers loaded from a stream.

Open question: a new Received now also goes above an existing Delivered-To, where before it went below it. I believe the RFC requires this, since both record the handling sequence, but it changes behavior for messages that already have a Delivered-To. Is that acceptable?

RFC 9228 requires each new Delivered-To header to be placed at the
current top of the headers, like Received, and never reordered with
respect to the other trace headers. addHeader now inserts Received
and Delivered-To above any existing header of either name, below a
possible Return-Path.

Fixes jakartaee#873

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support for RFC 9228: Delivered-To header

1 participant